import request from "@/utils/request";
import { serverBaseURL } from '@/constant/system.js'
// 请求地址前缀(微服务配置中的服务名称)
const baseURL = serverBaseURL

// 数据字典分页查询
export function selectByPage(data) {
  return request({
    url: baseURL+"/dictionary/selectByPage",
    method: "post",
    data: data,
  });
}
// 获取数据字型详情
export function getDictionaryById(data) {
  return request({
    url: baseURL+"/dictionary/getDictionaryById",
    method: "post",
    data,
  });
}
// 添加字典
export function addDictionary(data) {
  return request({
    url: baseURL+"/dictionary/addDictionary",
    method: "post",
    data,
  });
}
// 删除字典
export function deleteDictionary(data) {
  return request({
    url: baseURL+"/dictionary/deleteDictionary",
    method: "post",
    data,
  });
}
// 修改字典
export function updateDictionary(data) {
  return request({
    url: baseURL+"/dictionary/updateDictionary",
    method: "post",
    data,
  });
}
// 根据字典类型code获取字典列表
export function selectDictionaryByTypeCode(data) {
  return request({
    url: baseURL+"/dictionary/selectDictionaryByTypeCode",
    method: "post",
    data,
  });
}

